//
//  ZLViewController.m
//  ZLTextView
//
//  Created by zzl on 06/26/2023.
//  Copyright (c) 2023 zzl. All rights reserved.
//

#import "ZLViewController.h"
#import <ZLTextView/ZLTextView.h>

@interface ZLViewController ()<ZLTextViewDelegate>
@property (nonatomic, strong) ZLTextView *textView;
@end

@implementation ZLViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.textView = [[ZLTextView alloc] initWithFrame:CGRectMake(20, 100, self.view.frame.size.width - 40, 200)];
    self.textView.placeholder = @"请输入";
    self.textView.font = [UIFont systemFontOfSize:18];
    self.textView.maxLength = 200;
    self.textView.zlDelegate = self;
    [self.view addSubview:self.textView];
}

- (void)textViewDidChange:(UITextView *)textView {
    NSLog(@"%@", textView.text);
}

- (void)textViewTextLengthDidMax {
    NSLog(@"最大值");
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    NSLog(@"");
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
